import request from '@/utils/request'
import qs from "qs"

export function getExam(params) {
  return request({
    url: "/exam/exam",
    method: 'get',
    params,
    baseURL: "http://localhost:2345"
  })
}

export function addExam(data) {
  return request({
    url: "/exam/addexam",
    method: 'post',
    data: qs.stringify({ ...data }),
    baseURL: "http://localhost:2345"
  })
}

export function delexam(id) {
  return request({
    url: "/exam/delexam",
    method: 'get',
    params: { id },
    baseURL: "http://localhost:2345"
  })
}